//
//  DECXOrderTableViewCell.m
//  DECXInStore
//
//  Created by 程强 on 15/12/9.
//  Copyright © 2015年 程强. All rights reserved.
//

#import "DECXOrderTableViewCell.h"

@implementation DECXOrderTableViewCell

- (void)awakeFromNib {
    // Initialization code
    [super awakeFromNib];
}
- (void)setOrderInfo:(DECXStoreOrder *)order
{
    self.orderNoLbl.text = [NSString stringWithFormat:@"提单号:%@",order.getlist_id];
    self.orderTimeLbl.text = [NSString stringWithFormat:@"入库时间:%@",order.time];
    [self.productPicture setImageWithURL:[NSURL URLWithString:order.pic] placeholderImage:LoadImage(@"place_image")];
    self.orderNameLbl.text = order.name;
    self.weightLbl.text = [NSString stringWithFormat:@"剩余重量:%@吨",order.weight];
    if ([order.state isEqualToString:@"0"]) {
        self.reviewMarkLbl.text = @"未审核";
        self.reviewMarkLbl.textColor = [UIColor redColor];
    }else if ([order.state isEqualToString:@"1"]){
        self.reviewMarkLbl.text = @"审核通过";
        self.reviewMarkLbl.textColor = [UIColor greenColor];
    }else if ([order.state isEqualToString:@"2"]){
        self.reviewMarkLbl.text = @"审核未通过";
        self.reviewMarkLbl.textColor = [UIColor redColor];
    }
    if ([order.type integerValue] == 1) {
        self.typeLbl.text = @"合约仓单";
    }else if ([order.type integerValue] == 2){
        self.typeLbl.text = @"普通仓单";
    }
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
